<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <title>我的文件</title>
</head>
<body>
<!--导航-->
<nav th:replace="_fragments :: menu(1)" class="ui inverted attached segment m-padded-tb-mini m-shadow-small">
</nav>
<form id='uploadFile' th:action="@{/upload}" action='/upload' method='POST' enctype='multipart/form-data'>
   <input type="file" name="uploadFile" value="预览">
    <input type="submit" value="提交">
</form>
<h3 th:unless="${#strings.isEmpty(message)}" th:text="${message}">message</h3>
<div id="table-container">
    <table th:fragment="blogList" class="ui compact teal table">
        <thead>
        <tr>
            <th>图片</th>
            <th>链接</th>
            <th>删除</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="image : ${images}">
            <td><img src="#" th:src="'http://47.95.7.231:9002/'+${image.uri}" width="130" height="100"></td>
            <td><a href="#"   class="ui mini red basic button" th:href="'http://www.images.caohao.club/'+${image.uri}"  th:text="'www.images.caohao.club/'+${image.uri}">链接</a></td>
            <td>
                <a href="#"  class="ui mini red basic button" th:href="@{/deleteImage/{imageId}(imageId=${image.id})}">删除</a>
            </td>
        </tr>
        </tbody>
        <tfoot>
        <tr>
            <th colspan="7">
                <div class="ui mini pagination menu" th:if="${total}>1" >
                    <a th:href="/index/{page}(page=${pre})" class="item" th:unless="${pre}>0">上一页</a>
                    <a th:href="/index/{page}(page=${next})" class=" item" th:unless="${next}<${total}">下一页</a>
                </div>
            </th>
        </tr>
        </tfoot>
    </table>
</div>
<footer th:replace="_fragments :: footer"></footer>
<!--/*/<th:block th:replace="_fragments :: script">/*/-->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/semantic-ui/2.2.4/semantic.min.js"></script>
<!--/*/</th:block>/*/-->
<script>

</script>

</body>
</html>